﻿using Nb.Common.MachineCodes;

namespace Nb.Common.Hardwares
{
    //读取硬件信息组件
    /// <summary>
    /// 读取硬件信息组件（支持运行时替换）
    /// </summary>
    public class HardwareInfoFacade
    {
        /// <summary>
        /// 读取硬件信息
        /// </summary>
        public static HardwareInfo ReadHardwareInfo()
        {
            var service = HardwareInfoServiceRegistry.Instance.GetService();
            var result = service.ReadHardwareInfo();

            string logMessage = string.Format("read hardware info => {0}", result);
            Log(logMessage);

            return result;
        }

        private static void Log(string message)
        {
            UtilsLogger.LogMessage(message);
        }
    }


}
